package ModelLayer;


/**
 * Write a description of class DVDSample here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class DVDSample
{
    // instance variables - replace the example below with your own
    private int serialNr;
    private String acqDate;
    private double acqPrice;
    private boolean status;

    /**
     * Constructor for objects of class DVDSample
     */
    public DVDSample(int _serialNr, String _acqDate, double _acqPrice)
    {
        serialNr = _serialNr;
        acqDate = _acqDate;
        acqPrice = _acqPrice;
        status = true;
    }
    //get metoder
    public int getSerialNr()
    {
        return serialNr;
    }
    public String getAcqDate()
    {
        return acqDate;
    }
    public double getAcqPrice()
    {
        return acqPrice;
    }
    public boolean getStatus()
    {
        return status;
    }
    
    //setmetoder
    public void setSerialNr(int newSerialNr)
    {
        serialNr = newSerialNr;
    }
    public void setAcqDate(String newAcqDate)
    {
        acqDate = newAcqDate;
    }
    public void setAcqPrice(double newAcqPrice)
    {
        acqPrice = newAcqPrice;
    }
    public void setStatus(boolean newStatus)
    {
        status = newStatus;
    }
    
    
    //Methods
    public void rentSample()
    {
        if(!getStatus())
        {
            System.out.print("Error. This DVD has been rented.");
        }
        else
        {
            status = false;
        }
    }
    public void deliverSample()
    {
        if(getStatus())
        {
            System.out.print("Error. This DVD has not been rented.");
        }
        else
        {
            status = true;
        }
    }
}
